<template>
  <view class="message-wrap ss-flex">
  	<image class="icon" src="/static/index/icon-notice.png" mode="scaleToFill"></image>
  	<swiper
			class="swiper-box"
  	  :circular="true"
  	  :autoplay="true"
  	  :interval="3000"
  		:vertical="true"
  	>
  		<swiper-item
  		  class="swiper-item"
  		  v-for="(item, index) in data"
  		  :key="index"
				@tap="emits('onClick')"
  		>
  			<text>{{ item }}</text>
  		</swiper-item>
  	</swiper>
  </view>
</template>

<script setup>
  /**
   * 装修组件  - 轮播通知栏
   *
   */
  import sheep from '@/sheep';
  const props = defineProps({
    data: {
      type: Array,
      default: () => [],
    },
  });
	const emits = defineEmits(['onClick']);
</script>

<style lang="scss" scoped>
  .message-wrap {
  	.icon {
  		width: 40rpx;
  		height: 40rpx;
  	}
  	.swiper-box {
  		width: 100%;
  		height: 40rpx;
  		padding-left: 12rpx;
  	}
  }
</style>
